Optimal. Leaf size=189 \[ \frac {(A+7 C) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{a^2 d}+\frac {2 (A+5 C) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{3 a^2 d}+\frac {2 (A+5 C) \sin (c+d x)}{3 a^2 d \cos ^{\frac {3}{2}}(c+d x)}-\frac {(A+7 C) \sin (c+d x)}{a^2 d \sqrt {\cos (c+d x)}}-\frac {(A+7 C) \sin (c+d x)}{3 a^2 d \cos ^{\frac {3}{2}}(c+d x) (1+\cos (c+d x))}-\frac {(A+C) \sin (c+d x)}{3 d \cos ^{\frac {3}{2}}(c+d x) (a+a \cos (c+d x))^2} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.29, antiderivative size = 189, normalized size of antiderivative = 1.00, number of steps
used = 8, number of rules used = 7, integrand size = 35, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.200, Rules used = {4199, 3121,
3057, 2827, 2716, 2720, 2719} \begin {gather*} \frac {2 (A+5 C) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{3 a^2 d}+\frac {(A+7 C) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{a^2 d}-\frac {(A+7 C) \sin (c+d x)}{3 a^2 d \cos ^{\frac {3}{2}}(c+d x) (\cos (c+d x)+1)}+\frac {2 (A+5 C) \sin (c+d x)}{3 a^2 d \cos ^{\frac {3}{2}}(c+d x)}-\frac {(A+7 C) \sin (c+d x)}{a^2 d \sqrt {\cos (c+d x)}}-\frac {(A+C) \sin (c+d x)}{3 d \cos ^{\frac {3}{2}}(c+d x) (a \cos (c+d x)+a)^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2716
Rule 2719
Rule 2720
Rule 2827
Rule 3057
Rule 3121
Rule 4199
Rubi steps
\begin {align*} \int \frac {A+C \sec ^2(c+d x)}{\cos ^{\frac {5}{2}}(c+d x) (a+a \sec (c+d x))^2} \, dx &=\int \frac {C+A \cos ^2(c+d x)}{\cos ^{\frac {5}{2}}(c+d x) (a+a \cos (c+d x))^2} \, dx\\ &=-\frac {(A+C) \sin (c+d x)}{3 d \cos ^{\frac {3}{2}}(c+d x) (a+a \cos (c+d x))^2}+\frac {\int \frac {\frac {3}{2} a (A+3 C)+\frac {1}{2} a (A-5 C) \cos (c+d x)}{\cos ^{\frac {5}{2}}(c+d x) (a+a \cos (c+d x))} \, dx}{3 a^2}\\ &=-\frac {(A+7 C) \sin (c+d x)}{3 a^2 d \cos ^{\frac {3}{2}}(c+d x) (1+\cos (c+d x))}-\frac {(A+C) \sin (c+d x)}{3 d \cos ^{\frac {3}{2}}(c+d x) (a+a \cos (c+d x))^2}+\frac {\int \frac {3 a^2 (A+5 C)-\frac {3}{2} a^2 (A+7 C) \cos (c+d x)}{\cos ^{\frac {5}{2}}(c+d x)} \, dx}{3 a^4}\\ &=-\frac {(A+7 C) \sin (c+d x)}{3 a^2 d \cos ^{\frac {3}{2}}(c+d x) (1+\cos (c+d x))}-\frac {(A+C) \sin (c+d x)}{3 d \cos ^{\frac {3}{2}}(c+d x) (a+a \cos (c+d x))^2}+\frac {(A+5 C) \int \frac {1}{\cos ^{\frac {5}{2}}(c+d x)} \, dx}{a^2}-\frac {(A+7 C) \int \frac {1}{\cos ^{\frac {3}{2}}(c+d x)} \, dx}{2 a^2}\\ &=\frac {2 (A+5 C) \sin (c+d x)}{3 a^2 d \cos ^{\frac {3}{2}}(c+d x)}-\frac {(A+7 C) \sin (c+d x)}{a^2 d \sqrt {\cos (c+d x)}}-\frac {(A+7 C) \sin (c+d x)}{3 a^2 d \cos ^{\frac {3}{2}}(c+d x) (1+\cos (c+d x))}-\frac {(A+C) \sin (c+d x)}{3 d \cos ^{\frac {3}{2}}(c+d x) (a+a \cos (c+d x))^2}+\frac {(A+5 C) \int \frac {1}{\sqrt {\cos (c+d x)}} \, dx}{3 a^2}+\frac {(A+7 C) \int \sqrt {\cos (c+d x)} \, dx}{2 a^2}\\ &=\frac {(A+7 C) E\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{a^2 d}+\frac {2 (A+5 C) F\left (\left .\frac {1}{2} (c+d x)\right |2\right )}{3 a^2 d}+\frac {2 (A+5 C) \sin (c+d x)}{3 a^2 d \cos ^{\frac {3}{2}}(c+d x)}-\frac {(A+7 C) \sin (c+d x)}{a^2 d \sqrt {\cos (c+d x)}}-\frac {(A+7 C) \sin (c+d x)}{3 a^2 d \cos ^{\frac {3}{2}}(c+d x) (1+\cos (c+d x))}-\frac {(A+C) \sin (c+d x)}{3 d \cos ^{\frac {3}{2}}(c+d x) (a+a \cos (c+d x))^2}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 5 vs. order 4 in
optimal.
time = 7.49, size = 1391, normalized size = 7.36 \begin {gather*} \frac {i A \cos ^4\left (\frac {c}{2}+\frac {d x}{2}\right ) \csc \left (\frac {c}{2}\right ) \sec \left (\frac {c}{2}\right ) \left (A+C \sec ^2(c+d x)\right ) \left (\frac {2 e^{2 i d x} \, _2F_1\left (\frac {1}{2},\frac {3}{4};\frac {7}{4};-e^{2 i d x} (\cos (c)+i \sin (c))^2\right ) \sqrt {e^{-i d x} \left (2 \left (1+e^{2 i d x}\right ) \cos (c)+2 i \left (-1+e^{2 i d x}\right ) \sin (c)\right )} \sqrt {1+e^{2 i d x} \cos (2 c)+i e^{2 i d x} \sin (2 c)}}{3 i d \left (1+e^{2 i d x}\right ) \cos (c)-3 d \left (-1+e^{2 i d x}\right ) \sin (c)}-\frac {2 \, _2F_1\left (-\frac {1}{4},\frac {1}{2};\frac {3}{4};-e^{2 i d x} (\cos (c)+i \sin (c))^2\right ) \sqrt {e^{-i d x} \left (2 \left (1+e^{2 i d x}\right ) \cos (c)+2 i \left (-1+e^{2 i d x}\right ) \sin (c)\right )} \sqrt {1+e^{2 i d x} \cos (2 c)+i e^{2 i d x} \sin (2 c)}}{-i d \left (1+e^{2 i d x}\right ) \cos (c)+d \left (-1+e^{2 i d x}\right ) \sin (c)}\right )}{(A+2 C+A \cos (2 c+2 d x)) (a+a \sec (c+d x))^2}+\frac {7 i C \cos ^4\left (\frac {c}{2}+\frac {d x}{2}\right ) \csc \left (\frac {c}{2}\right ) \sec \left (\frac {c}{2}\right ) \left (A+C \sec ^2(c+d x)\right ) \left (\frac {2 e^{2 i d x} \, _2F_1\left (\frac {1}{2},\frac {3}{4};\frac {7}{4};-e^{2 i d x} (\cos (c)+i \sin (c))^2\right ) \sqrt {e^{-i d x} \left (2 \left (1+e^{2 i d x}\right ) \cos (c)+2 i \left (-1+e^{2 i d x}\right ) \sin (c)\right )} \sqrt {1+e^{2 i d x} \cos (2 c)+i e^{2 i d x} \sin (2 c)}}{3 i d \left (1+e^{2 i d x}\right ) \cos (c)-3 d \left (-1+e^{2 i d x}\right ) \sin (c)}-\frac {2 \, _2F_1\left (-\frac {1}{4},\frac {1}{2};\frac {3}{4};-e^{2 i d x} (\cos (c)+i \sin (c))^2\right ) \sqrt {e^{-i d x} \left (2 \left (1+e^{2 i d x}\right ) \cos (c)+2 i \left (-1+e^{2 i d x}\right ) \sin (c)\right )} \sqrt {1+e^{2 i d x} \cos (2 c)+i e^{2 i d x} \sin (2 c)}}{-i d \left (1+e^{2 i d x}\right ) \cos (c)+d \left (-1+e^{2 i d x}\right ) \sin (c)}\right )}{(A+2 C+A \cos (2 c+2 d x)) (a+a \sec (c+d x))^2}-\frac {8 A \cos ^4\left (\frac {c}{2}+\frac {d x}{2}\right ) \csc \left (\frac {c}{2}\right ) \, _2F_1\left (\frac {1}{4},\frac {1}{2};\frac {5}{4};\sin ^2(d x-\text {ArcTan}(\cot (c)))\right ) \sec \left (\frac {c}{2}\right ) \left (A+C \sec ^2(c+d x)\right ) \sec (d x-\text {ArcTan}(\cot (c))) \sqrt {1-\sin (d x-\text {ArcTan}(\cot (c)))} \sqrt {-\sqrt {1+\cot ^2(c)} \sin (c) \sin (d x-\text {ArcTan}(\cot (c)))} \sqrt {1+\sin (d x-\text {ArcTan}(\cot (c)))}}{3 d (A+2 C+A \cos (2 c+2 d x)) \sqrt {1+\cot ^2(c)} (a+a \sec (c+d x))^2}-\frac {40 C \cos ^4\left (\frac {c}{2}+\frac {d x}{2}\right ) \csc \left (\frac {c}{2}\right ) \, _2F_1\left (\frac {1}{4},\frac {1}{2};\frac {5}{4};\sin ^2(d x-\text {ArcTan}(\cot (c)))\right ) \sec \left (\frac {c}{2}\right ) \left (A+C \sec ^2(c+d x)\right ) \sec (d x-\text {ArcTan}(\cot (c))) \sqrt {1-\sin (d x-\text {ArcTan}(\cot (c)))} \sqrt {-\sqrt {1+\cot ^2(c)} \sin (c) \sin (d x-\text {ArcTan}(\cot (c)))} \sqrt {1+\sin (d x-\text {ArcTan}(\cot (c)))}}{3 d (A+2 C+A \cos (2 c+2 d x)) \sqrt {1+\cot ^2(c)} (a+a \sec (c+d x))^2}+\frac {\cos ^4\left (\frac {c}{2}+\frac {d x}{2}\right ) \sqrt {\cos (c+d x)} \left (A+C \sec ^2(c+d x)\right ) \left (-\frac {4 (4 C+A \cos (c)+3 C \cos (c)) \csc \left (\frac {c}{2}\right ) \sec \left (\frac {c}{2}\right ) \sec (c)}{d}-\frac {4 \sec \left (\frac {c}{2}\right ) \sec ^3\left (\frac {c}{2}+\frac {d x}{2}\right ) \left (A \sin \left (\frac {d x}{2}\right )+C \sin \left (\frac {d x}{2}\right )\right )}{3 d}-\frac {8 \sec \left (\frac {c}{2}\right ) \sec \left (\frac {c}{2}+\frac {d x}{2}\right ) \left (A \sin \left (\frac {d x}{2}\right )+3 C \sin \left (\frac {d x}{2}\right )\right )}{d}+\frac {16 C \sec (c) \sec ^2(c+d x) \sin (d x)}{3 d}+\frac {16 \sec (c) \sec (c+d x) (C \sin (c)-6 C \sin (d x))}{3 d}-\frac {4 (A+C) \sec ^2\left (\frac {c}{2}+\frac {d x}{2}\right ) \tan \left (\frac {c}{2}\right )}{3 d}\right )}{(A+2 C+A \cos (2 c+2 d x)) (a+a \sec (c+d x))^2} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(710\) vs.
\(2(225)=450\).
time = 0.25, size = 711, normalized size = 3.76
method | result | size |
default | \(\text {Expression too large to display}\) | \(711\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.54, size = 427, normalized size = 2.26 \begin {gather*} -\frac {2 \, {\left (3 \, {\left (A + 7 \, C\right )} \cos \left (d x + c\right )^{3} + 4 \, {\left (A + 8 \, C\right )} \cos \left (d x + c\right )^{2} + 8 \, C \cos \left (d x + c\right ) - 2 \, C\right )} \sqrt {\cos \left (d x + c\right )} \sin \left (d x + c\right ) + 2 \, {\left (\sqrt {2} {\left (i \, A + 5 i \, C\right )} \cos \left (d x + c\right )^{4} + 2 \, \sqrt {2} {\left (i \, A + 5 i \, C\right )} \cos \left (d x + c\right )^{3} + \sqrt {2} {\left (i \, A + 5 i \, C\right )} \cos \left (d x + c\right )^{2}\right )} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right ) + 2 \, {\left (\sqrt {2} {\left (-i \, A - 5 i \, C\right )} \cos \left (d x + c\right )^{4} + 2 \, \sqrt {2} {\left (-i \, A - 5 i \, C\right )} \cos \left (d x + c\right )^{3} + \sqrt {2} {\left (-i \, A - 5 i \, C\right )} \cos \left (d x + c\right )^{2}\right )} {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right ) + 3 \, {\left (\sqrt {2} {\left (-i \, A - 7 i \, C\right )} \cos \left (d x + c\right )^{4} + 2 \, \sqrt {2} {\left (-i \, A - 7 i \, C\right )} \cos \left (d x + c\right )^{3} + \sqrt {2} {\left (-i \, A - 7 i \, C\right )} \cos \left (d x + c\right )^{2}\right )} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) + i \, \sin \left (d x + c\right )\right )\right ) + 3 \, {\left (\sqrt {2} {\left (i \, A + 7 i \, C\right )} \cos \left (d x + c\right )^{4} + 2 \, \sqrt {2} {\left (i \, A + 7 i \, C\right )} \cos \left (d x + c\right )^{3} + \sqrt {2} {\left (i \, A + 7 i \, C\right )} \cos \left (d x + c\right )^{2}\right )} {\rm weierstrassZeta}\left (-4, 0, {\rm weierstrassPInverse}\left (-4, 0, \cos \left (d x + c\right ) - i \, \sin \left (d x + c\right )\right )\right )}{6 \, {\left (a^{2} d \cos \left (d x + c\right )^{4} + 2 \, a^{2} d \cos \left (d x + c\right )^{3} + a^{2} d \cos \left (d x + c\right )^{2}\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {A+\frac {C}{{\cos \left (c+d\,x\right )}^2}}{{\cos \left (c+d\,x\right )}^{5/2}\,{\left (a+\frac {a}{\cos \left (c+d\,x\right )}\right )}^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________